package com.TwinBlade.PicturePassword;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;

public class e extends Dialog
{
  static final int[] a = { 16842908 };
  static final int[] b = { 16842919 };
  private static String e = "Tap on center color to confirm.\nPress back to cancel";
  private static String f = "Pick a color";
  private j c;
  private int d;
  private Context g;
  private EditText h;
  private i i;
  private SeekBar j;
  private j k = new f(this);
  private SeekBar.OnSeekBarChangeListener l = new g(this);
  private TextWatcher m = new h(this);

  public e(Context paramContext, j paramj, int paramInt)
  {
    super(paramContext);
    this.g = paramContext;
    this.c = paramj;
    this.d = paramInt;
  }

  private int a(String paramString)
  {
    int n = -1;
    int i3;
    int i2;
    int i1;
    if (paramString.length() == 8)
    {
      i3 = Integer.parseInt(paramString.substring(0, 2), 16);
      i2 = Integer.parseInt(paramString.substring(2, 4), 16);
      i1 = Integer.parseInt(paramString.substring(4, 6), 16);
      n = Integer.parseInt(paramString.substring(6, 8), 16);
    }
    while (true)
    {
      return Color.argb(i3, i2, i1, n);
      if (paramString.length() == 6)
      {
        i3 = 255;
        i2 = Integer.parseInt(paramString.substring(0, 2), 16);
        i1 = Integer.parseInt(paramString.substring(2, 4), 16);
        n = Integer.parseInt(paramString.substring(4, 6), 16);
      }
      else
      {
        i1 = n;
        i2 = n;
        i3 = n;
      }
    }
  }

  private String a(int paramInt)
  {
    String str1 = Integer.toHexString(Color.alpha(paramInt));
    String str2 = Integer.toHexString(Color.red(paramInt));
    String str3 = Integer.toHexString(Color.green(paramInt));
    String str4 = Integer.toHexString(Color.blue(paramInt));
    if (str1.length() == 1)
      str1 = "0" + str1;
    if (str2.length() == 1)
      str2 = "0" + str2;
    if (str3.length() == 1)
      str3 = "0" + str3;
    if (str4.length() == 1)
      str4 = "0" + str4;
    return "#" + str1 + str2 + str3 + str4;
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    LinearLayout localLinearLayout = new LinearLayout(this.g);
    localLinearLayout.setOrientation(1);
    localLinearLayout.setGravity(17);
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-1, -2);
    localLayoutParams.setMargins(10, 0, 10, 5);
    TextView localTextView = new TextView(this.g);
    localTextView.setText(e);
    localLinearLayout.addView(localTextView, localLayoutParams);
    this.i = new i(this, getContext(), this.k, this.d);
    localLinearLayout.addView(this.i, localLayoutParams);
    this.j = new SeekBar(this.g);
    this.j.setMax(255);
    this.j.setProgressDrawable(new l(this.g.getResources(), "alpha", true));
    this.j.setProgress(Color.alpha(this.d));
    this.j.setOnSeekBarChangeListener(this.l);
    localLinearLayout.addView(this.j, localLayoutParams);
    this.h = new EditText(this.g);
    this.h.addTextChangedListener(this.m);
    this.h.setText(a(this.d));
    localLinearLayout.addView(this.h, localLayoutParams);
    setContentView(localLinearLayout);
    setTitle(f);
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.e
 * JD-Core Version:    0.6.2
 */